<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="fragments/easyui_insdep_head :: easyui_insdep_head" th:with="title='添加仓库'">
</head>

<body>
<div style="width: 400px; padding: 60px 90px;">
    <form id="ff" name="ff" method="post" action="/warehousePost">
        <div style="margin-bottom: 20px">
            <input class="easyui-textbox theme-textbox-radius" id="warehousename" name="warehousename" style="width: 100%"
                   data-options="required:true, label:'仓库名称:'"/>
        </div>

        <div style="margin-bottom: 20px">
            <input class="easyui-textbox theme-textbox-radius" id="warehouselocation" name="warehouselocation" style="width: 100%"
                   data-options="required:true, label:'仓库地址:'"/>
        </div>

        <div style="margin-bottom: 20px">
            <input class="easyui-textbox theme-textbox-radius" id="warehousenote" name="warehousenote" style="width: 100%;height: 60px"
                   data-options="label:'备注:' , multiline:true"/>
        </div>

        <div style="text-align:center;padding:5px">
            <a href="javascript:void(0)" class="easyui-linkbutton" style="width: 100%" onclick="submitForm()">提交</a>
        </div>
    </form>
</div>
<script type="text/javascript">
    //<![CDATA[
    $(function () {
        $('#ff').form({
            success: function (data) {     // 提交成功后的回调函数。
                data = data == "success" ? "添加成功" : "添加失败";
                $.messager.alert('结果', data, 'info');
            }
        });
    });

    function submitForm() {
        $("#ff").submit();
    }
    //]]>
</script>

</body>
</html>